package com.visionblue.business.ship.page.dialog

import android.app.Dialog
import android.content.Context
import com.visionblue.business.ship.R
import kotlinx.android.synthetic.main.dialog_register_quit.*

/**
 * @author: xlh
 * @date: 2020-06-15 3:36 PM
 * @desc:
 */
class RegisterQuitDialog(
    context: Context
) : Dialog(context, R.style.blurry_slide_dialog) {

    var onDialogClickListener: OnDialogClickListener? = null

    init {
        setContentView(R.layout.dialog_register_quit)

        btnNotSave.setOnClickListener {
            dismiss()
            onDialogClickListener?.onNotSaveClick()
        }

        btnSave.setOnClickListener {
            onDialogClickListener?.onSaveClick()
            dismiss()
        }
    }

    interface OnDialogClickListener {
        fun onSaveClick()
        fun onNotSaveClick()
    }
}